# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>

_gemname=red-colors
pkgname=ruby-$_gemname
pkgver=0.3.0
pkgrel=1
pkgdesc='Provides a wide array of features for dealing with colors'
arch=(any)
url='https://github.com/red-data-tools/red-colors'
license=('MIT')
depends=(ruby)
options=('!emptydirs')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=($_gemname-$pkgver.gem)
sha512sums=('baa05634213a46da968a42e478db097c5bc47187e61807a3b3c30b8109a0fae63d587e5a3227b5bca75b921304b9d5e24a5ba945361dd5eba1c25235889c2cf1')

package() {
  local _gemdir="$(ruby -e'puts Gem.default_dir')"
  gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem
  rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem"
  install -D -m644 "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}
